#ifndef _RECVBUFFER_H_
#define _RECVBUFFER_H_

#include <windows.h>
//=============================================================================================================================
//=============================================================================================================================
#define CONST_RECVBUFFER_LENGTH (1024)
class RecvBuffer
{
public:
	RecvBuffer()			{ m_nLastRecvd = 0;  }
	virtual ~RecvBuffer()	{  }

	inline VOID	Completion( int nBytesRecvd ) { m_nLastRecvd = nBytesRecvd; }

	inline VOID	Clear() { m_nLastRecvd = 0; }

	inline VOID	GetRecvParam( BYTE **ppRecvPtr, int &nLength )
	{
		*ppRecvPtr	= m_aRevcBuf;
		nLength		= CONST_RECVBUFFER_LENGTH;
	}

	inline BYTE* GetBufPtr() { return (BYTE*)m_aRevcBuf; }
	inline int GetBytesReceived() { return m_nLastRecvd; }

private:
	BYTE				m_aRevcBuf[CONST_RECVBUFFER_LENGTH];
	UINT				m_nLastRecvd;
};

#endif
